home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / calctime.zip / CALCTIME.DOC < prev   
Text File  |  1990-09-16  |  24KB  |  727 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.              ┌───────────────────────────────────────────────────┐
  7.              │                CALCTIME version 1.2               │
  8.              │                                                   │
  9.              │         DOS Command Utility Involving Time.       │
  10.              │                                                   │
  11.              │                 Reference Manual                  │
  12.              └───────────────────────────────────────────────────┘
  13.  
  14.  
  15.                                  Steve Williams
  16.                                    4380 US 29
  17.                                Tucker, Ga  30084
  18.  
  19.                       Copyright 1990. All rights reserved.
  20.  
  21.  
  22.      This version of Calctime is available as "shareware". Non-registered
  23.      users are granted a limited licence to make an evaluation copy for
  24.      trail use on a private, non-commercial basis. After evaluating this
  25.      software, you should either register your copy or discontinue it's
  26.      use. Registration entitles you to private use the software.
  27.  
  28.  
  29.                                    Disclaimer
  30.  
  31.      Use of this program acknowledges this disclaimer: "This program is
  32.      supplied as is. The author disclaims all warranties, expressed or
  33.      implied, including, without limitation, the warranties of
  34.      merchantability and of fitness of this program for any purpose. The
  35.      author assumes no liability for damages direct, indirect, or
  36.      consequential, which may result from the use or misuse of this
  37.      program."
  38.  
  39.                        Use this program at your own risk.
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.                                      - 1  -
  66.  
  67.  
  68.  
  69.  
  70.                              ┌───────────────────┐
  71.                              │ Table of Contents │
  72.                              └───────────────────┘
  73.      
  74.                            Title page and Disclaimer
  75.                              Distribution Contents
  76.                                   Introduction
  77.                                      Usage
  78.                                      Errors
  79.                               Software Information
  80.                                Registration Form
  81.  
  82.  
  83.      Distribution Contents
  84.  
  85.      The following files are included in the CALCTIME Package.
  86.  
  87.                    CALCTIME.COM
  88.                    CALCTIME.DOC
  89.  
  90.  
  91.  
  92.      Introduction
  93.  
  94.          This utility is similar to David Cusimano's program USETIME.EXE.
  95.      Mr. Cusimano did an excellent job on USETIME, but the program does not
  96.      perform the work that I required of it. So, I worked up CALCTIME to
  97.      replace and remove the limitations of USETIME.
  98.  
  99.          Calctime is capable of not only substituting time parameters in
  100.      DOS commands, but of manipulating the time and date as well; there are
  101.      also more substitutions available to the user. This utility runs in a
  102.      smaller environment, and conserves memory much better than previous
  103.      versions.
  104.  
  105.          This program is flexible and is aware of it's true name, if you
  106.      rename it, it will inform you of such on the help screen. This is not
  107.      a protection scheme, but something I've been playing around with and
  108.      working on. Calctime's awareness also has a direct effect on it's use
  109.      in conjunction with the environment list.
  110.  
  111.          Read this documentation and try out the program. If you find it to
  112.      be useful, please register it for $10(US). By supporting shareware,
  113.      you make it possible for shareware products to be produced.
  114.  
  115.          This program should be error free. If you encounter an error, I
  116.      will be more than willing to correct the error as soon as possible.
  117.      Thank You for your support.
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.                                      - 2  -
  132.  
  133.  
  134.  
  135.  
  136.      Usage
  137.  
  138.      CalcTime has the following format:
  139.  
  140.          CALCTIME [/switches] (command) [arguments and keys]  <cr>
  141.      
  142.  
  143.      SWITCHES: a few rules to live by... but, switches are optional.
  144.      
  145.      - All switches must appear before the substituting command line.
  146.      - All switches are denoted by a slash ("/") in front of each switch.
  147.      - Each switch must be separated by at least one space.
  148.      - And, switches may not contain any spaces in them.
  149.  
  150.      The following switches directly effect the time and date substitution
  151.      keys. All these switches are cumulative in nature.
  152.  
  153.      Y±Σ : adds or subtracts years from the current value.
  154.      M±Σ : adds or subtracts months from the current value.
  155.      D±Σ : adds or subtracts days from the current value.
  156.  
  157.      H±Σ : adds or subtracts hours from the current value.
  158.      I±Σ : adds or subtracts minutes from the current value.
  159.      S±Σ : adds or subtracts seconds from the current value.
  160.  
  161.      - "±"  denotes a plus(+) or minus(-), for addition and subtraction.
  162.      - "Σ"  denotes an integer or another substitution key.
  163.  
  164.          An integer I can see, but another substitution key? Here's an
  165.      example, what if you are using the current day + the current month for
  166.      a dynamic password scheme in some program. Calctime can now be used to
  167.      automate that program's execution. Most people will not have use for
  168.      Cacltime's ability to add(or subtract) keys with one another, but
  169.      someone might, so I included it.
  170.  
  171.      1-7 :
  172.          The switches 1-7 are used to change the logical "beginning of the
  173.      week" weekday. Does this sound strange? For most of us, the week
  174.      begins on Monday (or is it Friday afternoon), but the calender starts
  175.      on Sunday, and the motion picture industry begins the week on Friday.
  176.      This switch is used to select the beginning weekday for use in
  177.      calculating the week number of the year. This switch is designed for
  178.      use with business purposes in mind. If you are not going to be using
  179.      the "K" key, do not be concerned. If you will be using the "K" key,
  180.      please note that this utility assumes the week begins on Sunday. To
  181.      change this assumption, use the "1" - "7" switches:
  182.  
  183.      The numbers correspond to days in this fashion:
  184.      /1 - Sunday   (the default value)
  185.      /2 - Tuesday
  186.      /3 - Monday
  187.      /4 - Wednesday
  188.      /5 - Thursday
  189.      /6 - Friday
  190.      /7 - Saturday
  191.  
  192.  
  193.      P:
  194.          The "P" switch will Print the command line to the standard output
  195.      device before executing it.
  196.  
  197.                                      - 3  -
  198.  
  199.  
  200.  
  201.  
  202.      R:
  203.          The "R" switch will cause Calctime to Read the current time (in
  204.      absolute seconds since 1970) from the standard input device. There
  205.      will be no prompt displayed by Calctime, thus, improper use can hold
  206.      up an automated batch file.
  207.  
  208.          This switch can be extremely useful for batch files executing near
  209.      a time or date boundary (such as midnight). The R switch causes
  210.      Calctime to set the variable clock key (denoted by #) to absolute
  211.      seconds in time. This value is read from the standard input device and
  212.      is the number of seconds that have elapsed since Jan 1, 1970. This
  213.      value can be stored to a file using DOS redirection and the "Z" key.
  214.  
  215.          The general idea is to save a time value to a temporary file, and
  216.      then use that file (via DOS redirection) as input to the /R switch. To
  217.      save the current time value, use the Z substitution key. The following
  218.      example shows this procedure:
  219.  
  220.      CALCTIME echo $z > holdtime    { store absolute seconds to temp file }
  221.      CALCTIME /r copy c:\daily\files\*.* c:\archive\#m-#d-#y.dat < holdtime
  222.                                     { use the saved time in the next cmd  }
  223.      DEL holdtime  { delete the temp file after your done with it }
  224.  
  225.      Although this example doesn't really show off /R's usefulness, try to
  226.      imagine a batch file that is much longer and occurs just before
  227.      midnight. Although it has not been wise to set up a system to do
  228.      day-end processing before the midnight barrier, this program does give
  229.      you the power and flexibility to do such systems.
  230.  
  231.  
  232.      E:
  233.          The "E" switch tells Calctime to